package github.sf.mod.calculate.entity;

import github.sf.mod.calculate.Op;

public class Unary extends Expression {
    private Op op;
    //表达式
    private Expression exp;
    //前缀还是后缀
    boolean isPrefix;

    public Unary(Op op, Expression exp, boolean isPrefix) {
        this.op = op;
        this.exp = exp;
        this.isPrefix = isPrefix;
    }

    public Op getOp() {
        return op;
    }

    public void setOp(Op op) {
        this.op = op;
    }

    public Expression getExp() {
        return exp;
    }

    public void setExp(Expression exp) {
        this.exp = exp;
    }

    public boolean isPrefix() {
        return isPrefix;
    }

    public void setPrefix(boolean prefix) {
        isPrefix = prefix;
    }
}
